package com.bl.student.dao.repository;

import com.bl.student.dao.model.UserVoteEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by yujingyi on 2018/4/1.
 */
public interface UserVoteRepository extends JpaRepository<UserVoteEntity, String> {
    List<UserVoteEntity> findByUserId(String userId);

    List<UserVoteEntity> findByVoteId(String voteId);

    List<UserVoteEntity> findByUserIdAndSubjectId(String userId, String subjectId);

    void deleteByUserId(String userId);
}
